
<?php
//Inclusion du header de la page
include 'header.php';
?>

<script type="text/javascript" src="JS/gestionMap2.js"></script>

</head>

<body>

    <header id="header">
        <hgroup>
            <h1 class="site_title"><a href="index.html">Projet BIMSITE</a></h1>
            <h2 class="section_title">Edition de parcours de chasse au trésor</h2><div class="btn_view_site">
                <!--                            <a href="http://www.medialoot.com">View Site</a>-->
            </div>
        </hgroup>
    </header>

    <section id="secondary_bar">
        <div class="user">
            <p> <?php
session_start();

// On teste si la variable de session existe et contient une valeur
if (empty($_SESSION['username'])) {
// Si inexistante ou nulle, on redirige vers le formulaire de login
    header('Location: identification.php');
    exit();
}
echo "" . $_SESSION['username'] . "   (";
echo "<a id='deconnexion' href='logout.php'>Deconnexion</a>)"
?></p>
            <!-- <a class="logout_user" href="#" title="Logout">Logout</a> -->
        </div>
        <div class="breadcrumbs_container">
            <article class="breadcrumbs"><a href="#">Gestion de Site</a> <div class="breadcrumb_divider"></div> <a class="current">Création de site</a></article>
        </div>
    </section><!-- end of secondary bar -->

    <aside id="sidebar" class="column">
        <form class="quick_search">
            <input type="text" value="Quick Search" onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;">
        </form>
        <hr/>
        <h3>Gestion Site</h3>
        <ul class="toggle">
            <li class="icn_new_article"><a href="creationSite.php">Création de site</a></li>
            <li class="icn_edit_article"><a href="#dialog" name="modal">Modification de site</a></li>               
        </ul>
        <h3>Utilisateurs</h3>
        <ul class="toggle">
            <li class="icn_add_user"><a href="ajouterUser.php">Ajout d'un utilisateur</a></li>
            <li class="icn_view_users"><a href="users.php">Liste des utilisateurs</a></li>
        </ul>
        <h3>Admin</h3>
        <ul class="toggle">
            <li class="icn_settings"><a href="#">Options</a></li>
            <li class="icn_security"><a href="#">Security</a></li>
            <li class="icn_jump_back"><a href="#">Logout</a></li>
        </ul>

        <footer>
        </footer>
    </aside><!-- end of sidebar -->

    <section id="main" class="column">

        <article  class="module width_quarter">
            <header><h3>Localisation</h3></header>
            <form id="search_frm" class="form" action="#" method="post">
                <div class="module_content">
                    <fieldset>
                        <label for="adresse">Adresse </label>
                        <input type="text" id="addr" name="adresse" value=""/><br/>
                    </fieldset>
                    <fieldset class="bouttonForm">
                        <input type="submit" value="Localiser"/><br/>
                    </fieldset>
                    <fieldset>
                        <label for="latitude">Latitude</label>
                        <input id="lat" type="text" name="latitude" readonly="readonly"/><br/>
                    </fieldset>
                    <fieldset>
                        <label for="longitude">Longitude </label>
                        <input id="long" type="text" name="longitude" readonly="readonly" /><br/>
                    </fieldset>
                </div>
                <footer>
                    <div class="submit_link">
                        <input type="submit" value="Ajouter le site" class="alt_btn" onclick="$ajoutSite();">
                    </div>
                </footer>
            </form>
        </article>


        <article class="module width_3_quarter">
            <header><h3>Site</h3></header>
            <div class="module_content">
                <div id="map_canvas" class="gmap3"></div>
                <div class="clear"></div>
            </div>
        </article><!-- end of stats article -->

        <div class="spacer"></div>

        <article class="module width_3_quarter">
            <header><h3 class="tabs_involved">Liste des sites</h3>
            </header>
            <div class="tab_container">
                <table id="table_site" class="tablesorter" cellspacing="0"> 
                    <thead> 
                        <tr> 
                            <th>Nom Site</th> 
                            <th>Actions</th> 
                        </tr> 
                    </thead> 
                    <tbody> 
                    </tbody> 
                </table>
                <!-- end of #tab1 -->
                <div class="clear"></div>
            </div>
        </article>

        <div class="spacer"></div>

    </section>

    <div id="boxes">

        <div id="dialog" class="window" id="dialog">
            <article class="module width_full">
                <header><h3>Liste des sites</h3></header>
                <div class="module_content">
                    <div>
                        <p>Choisissez un site</p>
                        <ul id="lienSite"></ul>
                    </div>
                </div>
               <footer>
                    <div class="submit_link">
                        <input type="submit" value="Annuler" class="close">
                        <a href="creationSite.php"><input type="submit" value="Nouveau site" class="alt_btn"></a>
                    </div>
                </footer>
            </article>
        </div>

        <!-- Masque pour masquer l'ensemble de l'écran -->
        <div id="mask"></div>

    </div>

</body>

</html>
